package dp;

import java.math.BigInteger;

public class P1025 {
    public boolean divisorGame(int n) {
        if (n <= 1) {
            return false;
        }
        boolean[] flag = new boolean[n + 1];
        flag[1] = false;
        flag[2] = true;
        for (int i = 3; i <= n; i++) {
            for (int j = 1; j < i; j++) {
                if ((i % j) == 0 && !flag[i - j]) {
                    flag[j] = true;
                }
            }
        }
        return flag[n];
    }

    public static void main(String[] args) {
        System.out.println(new P1025().divisorGame(4));
    }
}
